﻿using System.IO;

namespace Mp3LibraryViewed
{
    /// <summary>
    /// Stack element used for directory traversal.
    /// </summary>
    internal class DirNode
    {
        internal string[] Dirs;
        internal int Index;
        internal string folderFileName;
        internal MemoryStream picStream;
        internal string errorMessage;


        public DirNode (string root)
        {
            this.Dirs = new string[] { root };
        }


        internal DirNode (string[] dirs)
        { 
            this.Dirs = dirs;
        }

        public string Current
        {
            get { return Dirs[Index]; }
        }


        public string MakeName (string baseName)
        {
            return Dirs[Index] + Path.DirectorySeparatorChar + baseName;
        }
    }
}
